class TreeNode(object):
    def __init__(self, data):
        self.data = data
        self.children = []
        
    def add_child(self, data):
        node = TreeNode(data)
        self.children.append(node)
        return node

    def walk(self, depth=0):
        for child in self.children:
            yield (depth, child.data)
            for sub_depth, sub_child in child.walk(depth+1):
                yield (sub_depth, sub_child)


        
class Shot(object):
    def __init__(self, start, duration):
        self.start = start
        self.duration = duration

            
class Sequence(object):
    def __init__(self, name):
        self.name = name
    

data = get_data()


    
tree = TreeNode(None)

seq_node = tree.add_child(Sequence("seq_001"))
seq_node.add_child(Shot(1,10))

for depth, item in tree.walk():
    print " "*depth + str(item)


